<template>
  <n-checkbox-group :size="size" :value="value" @update:value="updateValue" :max="max" :min="min">
    <n-grid :y-gap="8" :cols="cols || 8">
      <n-gi v-for="option in options">
        <n-checkbox :value="option.value" :label="option.label" :disabled="option.disabled" />
      </n-gi>
    </n-grid>
  </n-checkbox-group>
</template>

<script setup lang="tsx">
let props = defineProps<{
  options?: any[],
  value?: (string | number)[],
  size?: 'small' | 'medium' | 'large',
  cols?: number,
  max?: number,
  min?: number,
}>()

let emits = defineEmits(['update:value'])
let updateValue = (v) => {
  emits('update:value', v)
}
</script>
